(navigation image)
Home American Libraries | Canadian Libraries | Universal Library | Community Texts | Project Gutenberg | Children's Library | Biodiversity Heritage Library | Additional Collections
Search: Advanced Search
Anonymous User (login or join us)
Upload
See other formats

Full text of "Circuits"

LED Light Brick 



Makej Projects 



LED Light Brick 

Written By: Alden Hart 



PARTS: 

Circuit board from the light brick kit (1) 
or make your own from the CAD files. Both are available at 
http://makezine.com/18/lightbrick. 
PIC 16F916 microcontroller (1) 

labeled as U1 on the PCB and the schematic, which is also available at the link above 
LEDs 5mm 20mA wide viewing angle 0.100" lead spacing (20) 
5 each, red, yellow, green, and blue. D1-D20 on the PCB and schematic 
100Q resistors Va watt 5 carbon film (20) 
R1-R20 

20kQ resistors Va watt 5 carbon film (2) 
R21. R22 

10 F capacitor tantalum 16 volts 0.1" lead spacing C1 (1) 
0.1 F capacitor monolithic 0.100" lead spacing C2 (1) 
Rolling ball tilt switch 0.100" lead spacing SW1 (1) 
DC power connector 2.1mm ID coaxial J 1 (1 ) 
Rubber bumpers or feet (4) 
DC power supply (1) 

wall wart), 5V DC regulated, 300mA or more, 2. 1mm ID/5.5mm OP, center positive (I 
recommend a 400mA supply because sometimes 300mA ratings are a bit optimistic.) 
• 12" length of 14 solid wire (1) 
Make Projects 



www.makeprojects.com 



Page 1 of 14 



LED Light Brick 
optional 

22pF capacitors monolithic or ceramic disc 0.100" lead spacing (2 optional) C3 C4 (1) 
Single-row header connector 6-pin 0.100" (1) 

IC SP connector (For molding, use O and P to make your own mold, or use Q instead.) 
Silicone RT V Mold- Making System 11b silicone and 0.11b catalyst (1) 
from TAP Plastics (http://tapplastics.com). My mold used all 16oz; if you design a bigger 
mold, get more. 
Lego bricks (1) 
for building a mold box 

Self-releasing polypropylene mold 3"x5"x15" (1) 
such as Castin' Craft MC-7. part #43893 
Clear-Lite polyester casting resin 16oz (1) 
from TAP Plastics 
MEKP liquid catalyst 1 /2Qz(1) 
Paper cups 12oz or 16oz (2) 
(for measuring and pouring) 
Stirring sticks (2) 
Clear gloss resin spray (1) 
optional (such as Castin' Craft Resin Spray, for covering imperfections) 



SUMMARY 

The Little Glowing Friend (I named it after the ever-vigilant blue canary night light in a They 
Might Be Giants song) uses a single-chip microcontroller to drive 20 LEDs in a variety of 
patterns. The circuit is embedded in a clear resin casting, creating a lively, self-contained 
display. The light brick takes about 2 watts of power, and should last more than 10 years in 
continuous operation. 

I gave away 24 of these in 2006; most have been on ever since, and there have been no 
reported failures. Electricity cost is about $1 a year, for 24x7 operation. 



) Make Projects www.makeprojects.com Page 2 of 14 



LED Light Brick 



Step 1 — Assemble the circuit board. 




• First, locate the top and bottom of the PCB. The top has the silk-screen and component 
designators. The bottom has most of the wiring. 

• Solder the resistors first. Use 100Q resistors for R1-R20, and 20K resistors for R21 and 
R22. Resistors are not polarized, so it's not necessary to line up the color codes, but it 
does make for a neater job. Tape the resistors tightly to the top of the board using blue 
masking tape; they'll trap air bubbles underneath them if they're not down tight. 

• Flip the board over and solder. If any of the resistors shifted, heat them up and push them 
back down. Cut the leads down to the solder joints with wire cutters and remove the blue 
tape. 



) Make Projects 



www.makeprojects.com 



Page 3 of 14 



LED Light Brick 



Step 2 



*M 



J!Mk*i 



^«LCy 




• Place capacitors C1 and C2 on the board. The tantalum capacitor C1 is polarized and must 
be inserted as indicated on the board. The positive (+) side of the capacitor goes in the + 
hole, which is the square one. Tape, solder, and cut as before. 

• Carefully bend the leads of the PIC to fit the board's chip hole spacing. Place the PIC with 
pin 1 (the indented end) pointing to R21 and R22. Carefully solder, without putting too 
much heat on any pin. Double-check that the polarity is correct before soldering. 

• Attach the DC power connector J1. Bend the blades out somewhat from the bottom to hold 
the connector in place. Then solder it in flush to the surface of the board, using plenty of 
solder to seal the holes. 



) Make Projects 



www.makeprojects.com 



Page 4 of 14 



LED Light Brick 



Step 3 




• Attach LEDs D1-D20. The patterns are programmed for the following layout of LEDs: 
• RBGYR 

• YRBGY 
• GYRBG 
• BGYRB 

• Be sure to test your LEDs for function, and for color if it's not obvious by the casings. Use 
an LED tester or just squeeze the leads onto a 3V lithium coin cell. 

• For proper casting, you want the tops of all the LEDs to be roughly level, and taller than 
the power connector. The holes in the PCB are sized so that a standard LED lead will stop 
about 1" above the board. It's a tight fit, but it works. 

• If for some reason your LEDs don't have this stop, you'll need to make spacers. Make 20 
spacers by stripping 2" of insulation from #14 solid wire. Insert the insulation between each 
LED's leads, up by the LED case. 



) Make Projects 



www.makeprojects.com 



Page 5 of 14 



LED Light Brick 



Step 4 




• Place the LEDs in the board and test the heights against the power connector. Observe 
correct polarity when placing the LEDs. The long lead is the positive, or anode (A), and 
goes through the round hole. The short lead is the negative lead, or cathode (K), and goes 
through the square hole (mnemonic: "cats are negative"). If there's a flat spot on the LED it 
will be on the cathode side. 

• Turn the board upside down on a hard, flat surface to ensure all LEDs are lined up. Solder, 
and clip the leads. Remove any spacers using hemostats or fine pliers. Notice that the 
common rail is connecting all the positive (+) pins of the LEDs. (In some other LED 
projects there is a common ground (-) for all the LEDs.) 



) Make Projects 



www.makeprojects.com 



Page 6 of 14 




• Attach tilt switch SW1. The tilt 
switch is a rolling ball that runs on 
a track and closes (activates) 
when the ball rolls to the base 
where the wires stick out. It 
provides user input, acting like a 
button push or mouse click. The tilt 
switch is the only component that 
goes on the bottom of the board. It 
doesn't have a polarity. If you want 
it to activate when you tip the brick 
back toward the power connector, 
the switch must angle downward 
from the rear of the board, as 
pictured. 

• If you want this orientation, mount 
the switch on the bottom of the 
board through the switch holes 
labeled SW1 . Leave about Vi" of 
the switch leads exposed between 
the switch and the board. You'll 
need enough room to bend the 
leads to angle the switch. Use the 
SW2 position if you'd rather the 
switch activate 90° from the SW1 
position. 

• If you intend to program the 
PIC in-circuit, you'll need to 
attach capacitors C3 and C4 and 
the programming header J2 at this 
point. 



) Make Projects 



www.makeprojects.com 



Page 7 of 14 



LED Light Brick 



Step 6 




• If you intend to program the PIC in-circuit, you'll need to attach capacitors C3 and C4 and 
the programming header J2 at this point. 

• Don't plug the board in just yet. Visually inspect the PIC and the rest of the board for 
solder bridges (i.e., short circuits in your soldering). Remove any bridges with solder wick 
(for advice on how to do this, see http://makezine.com/18/lightbrick ). 

• Next, test the board for a short circuit. Use a continuity tester or ohmmeter to test the 
power connector's + and -terminals (located on the bottom of the board). 

• Finally, test that you have a good power supply. The center pin on the power supply 
connector should be a stable +5V, and the sleeve is ground. Be sure not to short out these 
contacts during this test! The board will actually work between about 4V-6V. The PIC 
doesn't like voltages above 6V and may blow out if overvoltage is applied. 

• If the board passes these tests, then plug it in! If the board doesn't work properly, consult 
the Troubleshooting section. Don't cast the brick until the circuit is working reliably. 



) Make Projects 



www.makeprojects.com 



Page 8 of 14 



LED Light Brick 



Step 7 — Make the mold and cast the block. 




• Since we've covered moldmaking 
and casting in a previous issue 
(see MAKE, Volume 08, page 160), 
we won't detail the process here. 
Complete moldmaking and resin 
casting instructions for this project 
are available at 

http://makezine.com/18/lightbrick/ . 
The easiest way to get a mold is to 
buy a pre-made one like the MC-7 
(see materials list). It's 3"x5"x15", 
a reasonable fit. 

• I prefer my own mold, for a better 
fit and a more interesting finished 
piece. The circuit board is designed 
to fit nicely into a volume 
3"x4 1 /4"x1"-2 1 /2" deep, but you can 
make the master mold any size 
and shape that will accommodate 
your board. Remember that the 
power connector needs to be flush 
against one side of the finished 
casting. 

• You can also house the Little 
Glowing Friend circuit board in any 
container you desire, but I like the 
permanence and uniqueness of the 
cast brick. 



) Make Projects 



www.makeprojects.com 



Page 9 of 14 



LED Light Brick 

Step 8 — Finish up. 




• Don't get impatient and demold the 
piece too early, as this can ruin it. 
Follow the manufacturer's 
recommended demold times, and 
then some. It's best to leave it 
overnight or even longer. 

• Remove the brick when it is truly 
cured. It should be fully cooled and 
hard. Resin hardens from the 
inside out, so the surface is the 
last part to harden. This can take 
well over a day depending on the 
mix and conditions. Don't judge by 
time; demold only when the surface 
is hard and no longer tacky. Test 
hardness using a stick, not your 
finger. 

• You can speed the surface cure by 
warming the brick under some 
lights, but be careful not to 
overheat the casting or the mold. 
Don't leave the lights on overnight 
or unattended 



) Make Projects 



www.makeprojects.com 



Page 10 of 14 




• Remove the tape from the power 
connector using hemostats. You 
may also need a knife if it's gotten 
coated over. 

• Even though the brick is hard at 
this point, the finish is still fragile. It 
will pick up fingerprints and will pit 
with dust. It's best to handle it only 
by the edges. You may want to 
"tent" it under wax paper and 
continue the cure. Don't let the wax 
paper touch the surface, or it will 
leave marks. Optionally, you can 
spray on a surface coat of resin at 
this point to protect the finish, but 
be aware that this may cloud the 
surface. Use sparingly. 

• Apply the bumper feet to the 
bottom and you're done. 



) Make Projects 



www.makeprojects.com 



Page 11 of 14 



LED Light Brick 

Step 10 — Fire up your little glowing friend. 




• Plug it in and watch it go! 

Activating the tilt switch will cycle 
the device between power off and 4 
different lighting programs — 
Waves, Colors, Calm, and 
Frenetic. 



) Make Projects 



www.makeprojects.com 



Page 12 of 14 



LED Light Brick 



Step 11 — Troubleshooting 




• If, for some reason, the board 
doesn't light when you test it (in 
Step 1i, before casting the brick, of 
course), check the following: 

• Ensure that all leads go through 
the holes, and check that none 
of the PIC leads have folded up 
under the chip body. They 
should all be visible from the 
bottom of the board. 

• Inspect the bottom of the board 
to ensure that all connections 
are soldered. 

• Check the polarization and 
orientation of components C1 , 
U1,andD1-D20. 

• Check that there are no solder 
bridges (two points connected 
that shouldn't be). 

• Check that the power supply is 
plugged in and outputting 
between 4 and 6 volts. Use a 
volt/ohm meter (VOM) or 
multimeter. 

• Check that the power supply is 
plugged in and outputting 
between 4 and 6 volts. Use a 
volt/ohm meter (VOM) or 
multimeter. 



) Make Projects 



www.makeprojects.com 



Page 13 of 14 



LED Light Brick 

Step 12 

• Check that the power supply is plugged in and outputting between 4 and 6 volts. Use a 
volt/ohm meter (VOM) or multimeter. 

• Check that the board is not short-circuited by testing the + and -terminals on the bottom 
of the board. 

• If some LEDs are working but not others, try doing the following: 

• Test the LED individually. Apply voltage from a coin cell across the LED terminals. 

• Next, test with a VOM that there is 100 ohms of resistance between the LED's negative 
terminal (the square hole) and the PIC pin. Trace the circuit visually or use the 
schematic diagram. 

NOTE: A complete bill of materials and tools, with sources, as well as moldmaking and resin- 
casting instructions, are available at http://makezine.com/18/lightbrick . 

This project first appeared in MAKE Volume 18 . 

This project first appeared in MAKE Volume 18 . page 102. 



) Make Projects www.makeprojects.com Page 14 of 14